# -*- coding: utf-8 -*-
import requests
import traceback

class Client:
    domain = 'api.wmcloud.com'
    port = 443
    token = ''
    def __init__( self, token):
        self.token=token
    def __del__( self ):
        pass
    def getData(self, path):
        result = None
        path='/data/v1' + path
        try:
            #set http header here
            response = requests.get("https://" + self.domain + path, headers = {"Authorization": "Bearer " + self.token}, timeout = 60)
            return response.status_code, response.text
        except Exception as e:
            traceback.print_exc()
        return -1, result

